<template>
	<view class="result">
		<image :src="becomeQuery.state == 1 ?$IMG_URL('/static/user/result1.png'):becomeQuery.state == 4 ?$IMG_URL('/static/user/result2.png'):$IMG_URL('/static/user/result3.png')" mode="" class="logo"></image>
		<view class="title" :style="{color:becomeQuery.state == 1 ?'#73F0EA': becomeQuery.state == 4?'#F37364':'#73F0EA'}">
			{{becomeQuery.state == 1 ?'审核中':becomeQuery.state == 2 ?'通过':becomeQuery.state == 4 ?'审核失败':'已入职'}}
		</view>
		<view class="size">
			{{becomeQuery.state == 1 ?'请等待平台审核': becomeQuery.state == 2 ?'优秀的健身教练，请您耐心等待平台工作人员联系' :becomeQuery.state == 4 ?becomeQuery.remark:''}}
		</view>
		<view class="btn" @click="back">
			{{becomeQuery.state == 1 ?'返回': becomeQuery.state == 2 ?'返回'?becomeQuery.state == 4:'更新资料':'返回'}}
		</view>
	</view>
</template>

<script>
	import {
		coachInfo,
	} from '@/api/apply.js'
	export default{
		data(){
			return{
				becomeQuery:{
					
				}
			}
		},
		methods:{
			getcoachInfo() {
				coachInfo().then(({
					data: res
				}) => {
					console.log('res', res);
					if (res.code == 1) {
						this.becomeQuery = res.data
					}
				})
			},
			back(){
				if(this.becomeQuery.state == 4){
					uni.redirectTo({
						url:'/pageB/user/become_coach/Apply_coach'
					})
				}else{
					uni.switchTab({
						url:'/pages/user/index'
					})
				}
			}
		},
		onLoad() {
			this.getcoachInfo()
		}
	}
</script>

<style lang="scss" scoped>
	.result{
		display: flex;
		flex-direction: column;
		align-items: center;
		.logo{
			margin-top: 102rpx;
			width: 172rpx;
			height: 172rpx;
		}
		.title{
			margin-top: 32rpx;
			font-size: 34rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
		}
		.size{
			margin-top: 13.5rpx;
			font-size: 28rpx;
			font-family: PingFang SC, PingFang SC-Regular;
			font-weight: 400;
			text-align: center;
			color: #999999;
		}
		.btn{
			margin-top: 84rpx;
			width: 346rpx;
			height: 88rpx;
			background: #73F0EA;
			border-radius: 16rpx;
			font-size: 34rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
			text-align: center;
			color: #ffffff;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>